function load(id,rdealId){
	$.ajax({
		url: Server +"/res/dea/zfpj",
		type: "POST",
		dataType : "JSON",
		data: {			
			"id" :id,
			"rdealId" :rdealId
		},
		success : function(data){
			var v =data ;
			$("#ww0").html(v[0].resultName);
			$("#ww1").html(v[0].resultDesc);
			$("#ww2").html(v[0].resultMinprice);
				
			
		}
	
	})
	
}

function next(id) {
	$.ajax({
		url : Server +"/res/dea/deal",
		type : "POST",
		dataType : "JSON",
		data : {
			"id" : id
		},
		async : false,
		success : function(data) {
			var o = data;
			var sdcList = o[0].sdc;
			var imgHtml = '';
			var docHtml = '';
			for (var i = 0; i < sdcList.length; i++) {
				varsdcPath = '';
				if (sdcList[i].upType == '1') {
					sdcPath = sdcList[i].path;
					imgHtml += '<img class="img-rounded zoomify" src=' + Server +'/'+ sdcPath + '>';
				} else if (sdcList[i].upType == '2') {
					sdcPath = sdcList[i].path;
					docHtml += '<a style="color: red; font-size: 20px" class="right_a" href=' + Server +'/'+ sdcPath + ' target="_blank">点击下载查看交易合同</a>';
				}
			}
			$(".pic").html(imgHtml);
			$("#doc").html(docHtml);

		}
	})
}
function insert(id,rdealId){
	var rpayContetn = $("#textCom").val();
	var resultId = GetQueryString('id');
	var rpayGrades = GetQueryString('rdealId');
	var rpayCreateTime = new Date();

	$.ajax({
		url:Server +"/res/dea/addComment",
		data:{
			"rpayContetn":rpayContetn,
			"rpayGrades":rpayGrades,
			"rpayCreateTime":rpayCreateTime,
			"resultId":resultId,
			//"toUid":toUid,
			//"uuId":uuId,
			//"puId":puId,
		},
		type:"POST",
		success : function(data){
			alert("评论成功");
			update();
		},
		error : function(msg) {
			alert("添加失败");
		}
	})
}
function update(){
   // rdealId= $('#7').val()
    //var resultId = $("#in7").val();
   // alert(rdealId); 
		$.ajax({
		    //url:"http://127.0.0.1/res/need/updatestatus",
			url : Server +"/res/need/updatestatus",
			type : "POST",
			data:$('#signupForm').serialize(),
			success : function(data){
				$(location).attr("href","orderManagement37");
			},
			error : function(msg){
				alert("修改失败，请联系管理员！");
			}
		});
	}
function GetQueryString(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if(r != null) return unescape(r[2]);
	return null;
}
